package com.thymeleaf.demo.painter;

/**
 * 方形
 *
 * @Author wang suo
 * @Date 2020/9/29 0029 20:27
 * @Version 1.0
 */
public class Rectangle implements Shape {

    private Double a;
    private Double b;

    @Override
    public Double getArea() {
        return a * b;
    }

    @Override
    public Double getPerimeter() {
        return (a + b) * 2;
    }
}
